﻿using ASmile.CodeFactory.DBModel;
using ASmile.Extend;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ASmile.CodeFactory.DaBLL
{
    class CodeBuilderBLL : DaMain
    {
        public ApiResultList<TConfig> GetConfigs(ArgPageData arg)
        {
            return new ConfigBLL().GetList(arg);
        }

        public TTableRemark GetTableRemark(string tableName)
        {
            var rModel = DB.Query<TTableRemark>(s => s.TableName == tableName).ToEntity();
            if (rModel == null)
            {
                return new TTableRemark
                {
                    TableName = tableName
                };
            }
            return rModel;
        }

        //public ApiResult<string> GetCode(TConfig confg) 
        //{ 

        //}
    }
}